package com.neusoft.neuiotms.dcom.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_inspection_rule_project_concrete")
@org.hibernate.annotations.Table(appliesTo = "neuiot_inspection_rule_project_concrete", comment = "巡检规则对象表")
public class InspectionRuleProjectConcrete extends AbstractModel {

    private static final long serialVersionUID = 1083244740829682617L;

    @ManyToOne
    private InspectionRuleProject inspectionRuleProject;

    @NotBlank(message = "项目内容")
    @Length(max = 255, message = "项目内容不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '项目内容：待巡检的资产的id或者系统的id'")
    private String concreteCode;

    @NotBlank(message = "项目名称")
    @Length(max = 255, message = "项目名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '项目名称：待巡检的资产的名称或者系统的名称'")
    private String concreteName;

    //    private List<InspectionTaskProjectItemValue> itemValue;
}
